﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CUREBusinessLogicLayer;
using System.Data;
namespace CURE.SystemManagement
{
    public partial class ConfigModify : System.Web.UI.Page
    {
        #region
        string switchCode;

        public string SwitchCode
        {
            get { return switchCode; }
            set { switchCode = value; }
        }
        string switchName;

        public string SwitchName
        {
            get { return switchName; }
            set { switchName = value; }
        }

        string switchValue;
        public string SwitchValue
        {
            get { return switchValue; }
            set { switchValue = value; }
        }

        string svalue;
        public string Svalue
        {
            get { return svalue; }
            set { svalue = value; }
        }

        #endregion
        ConfigBll configBll = new ConfigBll();
        protected void Page_Load(object sender, EventArgs e)
        {
            switchCode = Request.QueryString["id"];
            EditConfigData();
        }
        protected void EditConfigData()
        {
            DataTable dt = configBll.GetConfigByCode(switchCode);
            if (dt != null && dt.Rows.Count > 0)
            {
                switchName = dt.Rows[0]["switchname"].ToString();
                switchValue = dt.Rows[0]["switchvalue"].ToString();
                svalue = dt.Rows[0]["svalue"].ToString();
            }
        }
    }
}